package com.xunyin.modules.log.service.mapper;

import com.xunyin.common.mapper.CoreMapper;
import com.xunyin.modules.log.domain.TCleaningRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author admin
 * @date 2022-10-26
 */
@Repository
public interface TCleaningRecordMapper extends CoreMapper<TCleaningRecord> {


    @Select("<script> " +
            " SELECT t1.*,t2.store_room_name as teaChildName from t_cleaning_record t1 " +
            " LEFT JOIN mt_store_room t2 on t1.tea_child_id=t2.id " +
            " where t1.is_del=0 " +
            " <if test =\"storeId !=null\"> and t1.store_id = #{storeId} </if> " +
            " </script>")
    List<TCleaningRecord> queryCleaningRecordList(@Param("storeId") Integer storeId);



}
